Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for canonical k8s #357

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

Thanhphan1147
Copy link
Contributor

@Thanhphan1147 Thanhphan1147 commented Jun 17, 2024

This PR adds an input use-canonical-k8s to the integration-test workflow to allow deploying juju applications on canonical-k8s.

For now, this parameter must be used in conjuction with provider: k8s so that action-operator bootstraps canonical-k8s as a generic cluster when creating the juju controller.

action-operator will add support for canonical-k8s in the future. Until then, this will be used as a workaround since it's needed to test workflows running on canonical-k8s.

Checklist

  • The contributing guide was applied
  • The PR is tagged with appropriate label (urgent, trivial, complex)

Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
@Thanhphan1147 Thanhphan1147 marked this pull request as ready for review June 18, 2024 15:54
@Thanhphan1147 Thanhphan1147 requested a review from a team as a code owner June 18, 2024 15:54
Copy link
Collaborator

@arturo-seijas arturo-seijas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like some tests are filing. Can you double check?

@cbartz
Copy link
Contributor

cbartz commented Nov 14, 2024

@Thanhphan1147 what is the status here, please?

if: inputs.use-canonical-k8s && inputs.provider == 'k8s'
id: canonical-k8s
run: |
sudo snap install k8s --channel=${{ inputs.channel }} --classic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use another input variable for the channel? The default is latest/stable, and that does not exists for that snap.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not the best but I don't know if it's worth adding another option for this. I believe it might lead to confusion

echo "kubeconfig=$(sudo k8s config | base64 -w 0)" >> $GITHUB_OUTPUT

IPADDR=$(ip -4 -j route get 2.2.2.2 | jq -r '.[] | .prefsrc')
LB_FIRST_ADDR="$(echo "${IPADDR}" | awk -F'.' '{print $1,$2,$3,100}' OFS='.')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know much about this, but you will this work out of the box? You are in a subnet with other machines that may reply to arp requests for some of those ips.

Signed-off-by: Phan Trung Thanh <trung.thanh.phan@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants